import { Http, Loading, Toast } from 'esc-ui'
import urlMap from './urlmap'

// you can use env`s var to different env.
console.log(process.env.VUE_APP_BASEURL)
export const http = new Http({
  baseUrl: '',
  urlMap,
  successRequestAssert: (res) => res.success || res.retcode === 0,
  loadingMethods: Loading.instance,
  notify: Toast,
})
